package com.lepu.app.fun.my;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.core.lib.application.BaseFragmentActivity;
import com.lepu.app.widget.CustomTopBarNew;
import com.lepu.app.widget.CustomTopBarNew.OnTopbarNewLeftLayoutListener;
import com.lepu.pasm.R;

public class MyCollectActivity extends BaseFragmentActivity implements
		OnTopbarNewLeftLayoutListener {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.my_collect_activity);

		init();
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	/**
	 * 添加页面动画，需要重写这个方法，
	 */
	@Override
	public void onBackPressed() {
		finish(true);
	}

	@Override
	public void onTopbarLeftLayoutSelected() {
		finish(true);
	}

	/**
	 * 初始化方法
	 */
	private void init() {
		// topbar
		CustomTopBarNew topbar = (CustomTopBarNew) findViewById(R.id.topbar);
		topbar.setTopbarTitle("收藏");
		topbar.setonTopbarNewLeftLayoutListener(this);
	}

	public void viewClick(View view) {

		Intent intent = new Intent();

		int rid = view.getId();
		switch (rid) {
		case R.id.tieZiLayout:
			intent.setClass(this, MyTieZiActivity.class);
			break;
		case R.id.videoLayout:
			intent.setClass(this, MyVideoActivity.class);
			break;
		case R.id.articleLayout:
			intent.setClass(this, MyArticleActivity.class);
			break;

		default:
			break;
		}
		intent.putExtra("IsCollect", true);
		startActivity(intent, true);
	}

}
